package com.easyweb.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

 
import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.hibernate.validator.NotNull;
 
@Entity
@NamedQueries( {					
	@NamedQuery(name = "yabanciDilTumKayitlar", query = "select y from YabanciDil y  order by y.yabanciDilAdi")
		})
@Table  
public class YabanciDil {

	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private Long id;
	
	@Column(nullable=false,length=50)
	@NotNull(message="#{messages.errBosOlamaz}")
	private String yabanciDilAdi;

	public YabanciDil() {
		// TODO Auto-generated constructor stub
	}
	
	public YabanciDil(Long id, String yabanciDilAdi) {
		super();
		this.id = id;
		this.yabanciDilAdi = yabanciDilAdi;
	}

	public Long getId() {
		return id;
	}

	public String getYabanciDilAdi() {
		return yabanciDilAdi;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setYabanciDilAdi(String yabanciDilAdi) {
		this.yabanciDilAdi = yabanciDilAdi;
	}


}
